﻿using System.Linq;
using Microsoft.EntityFrameworkCore;

namespace Fee.Stores.Ef
{
    public class ProjectStore<T> : IProjectStore<T> where T : FeeDbContext
    {
        private readonly T _context;

        public ProjectStore(T context)
        {
            _context = context;
        }

        public Project GetById(int id, bool fullJoin = false)
        {
            IQueryable<Project> query = _context.Set<Project>();
            return query.FirstOrDefault(f => f.Id == id);
        }
    }
}